package cn.com.zpark.servlet_response;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @PackageName: cn.com.zpark.servlet_response
 * @ClassName: ResponseDemo06
 * @Description:
 * @author: RZS
 * @date: 2021/11/14  17:12
 */
@WebServlet("/rd6.jsp")
public class ResponseDemo06 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // 解决响应乱码的问题
        response.setContentType("text/html;charset=utf-8");

        response.getWriter().write("<h1>重定向过来的请求</h1>");
    }
}
